import SegmentTree from '../../../src/datastructure/tree/SegmentTree'

const nums = [-2, 0, 3, -5, -2, -1]
const seg = new SegmentTree(nums, function merger (a, b) {
  return a + b
})

console.log(seg + '')
console.log(seg.query(0, 2))
console.log(seg.query(1, 3))

seg.set(1, 9)
console.log(seg.query(0, 2))
